package pe.com.bn.sach.domain;

/**
 * Bnchf12FamiliarId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class Bnchf12FamiliarId implements java.io.Serializable {

	// Fields

	private Bnchf02Cliente bnchf02Cliente;
	private Bnchf01Persona bnchf01Persona;

	// Constructors

	/** default constructor */
	public Bnchf12FamiliarId() {
		bnchf02Cliente=new Bnchf02Cliente();
		bnchf01Persona=new Bnchf01Persona ();
	}

	/** full constructor */
	public Bnchf12FamiliarId(Bnchf02Cliente bnchf02Cliente,
			Bnchf01Persona bnchf01Persona) {
		this.bnchf02Cliente = bnchf02Cliente;
		this.bnchf01Persona = bnchf01Persona;
	}

	// Property accessors

	public Bnchf02Cliente getBnchf02Cliente() {
		return this.bnchf02Cliente;
	}

	public void setBnchf02Cliente(Bnchf02Cliente bnchf02Cliente) {
		this.bnchf02Cliente = bnchf02Cliente;
	}

	public Bnchf01Persona getBnchf01Persona() {
		return this.bnchf01Persona;
	}

	public void setBnchf01Persona(Bnchf01Persona bnchf01Persona) {
		this.bnchf01Persona = bnchf01Persona;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof Bnchf12FamiliarId))
			return false;
		Bnchf12FamiliarId castOther = (Bnchf12FamiliarId) other;

		return ((this.getBnchf02Cliente() == castOther.getBnchf02Cliente()) || (this
				.getBnchf02Cliente() != null
				&& castOther.getBnchf02Cliente() != null && this
				.getBnchf02Cliente().equals(castOther.getBnchf02Cliente())))
				&& ((this.getBnchf01Persona() == castOther.getBnchf01Persona()) || (this
						.getBnchf01Persona() != null
						&& castOther.getBnchf01Persona() != null && this
						.getBnchf01Persona().equals(
								castOther.getBnchf01Persona())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getBnchf02Cliente() == null ? 0 : this.getBnchf02Cliente()
						.hashCode());
		result = 37
				* result
				+ (getBnchf01Persona() == null ? 0 : this.getBnchf01Persona()
						.hashCode());
		return result;
	}

}